package com.example.backend.Controller;

import com.example.backend.Bean.User;
import com.example.backend.Service.UserService;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
//    @GetMapping("/{path:[a-z]+}/a?/**/*.do")
//    public String testPath(HttpServletRequest request, @PathVariable String path){
//      String uri =   request.getRequestURI();
//      return uri+"\npath= "+path;
//
//    }
    @Autowired
    public UserService  userService;
    @GetMapping("/detail")
    public User detail(){
        return userService.findUserById();
    }
}
